import request from '@/utils/request'

// 查询产品不良类型列表
export function listProductDefectType(query) {
  return request({
    url: '/produce/product-defect-type/list',
    method: 'get',
    params: query
  })
}

// 查询产品不良类型详细
export function getProductDefectType(id) {
  return request({
    url: '/produce/product-defect-type/' + id,
    method: 'get'
  })
}

// 新增产品不良类型
export function addProductDefectType(data) {
  return request({
    url: '/produce/product-defect-type',
    method: 'post',
    data: data
  })
}

// 修改产品不良类型
export function updateProductDefectType(data) {
  return request({
    url: '/produce/product-defect-type',
    method: 'put',
    data: data
  })
}

// 删除产品不良类型
export function delProductDefectType(id) {
  return request({
    url: '/produce/product-defect-type/' + id,
    method: 'delete'
  })
}

// 逻辑删除产品不良类型
export function removedProductDefectType(id) {
  return request({
    url: '/produce/product-defect-type/' + id,
    method: 'delete'
  })
}
